from django import forms
from django.utils.translation import ugettext as _

from l2ldjango.apps.usermanagement.models import *
from l2ldjango.apps.forum.models import *

class CreateForum(forms.ModelForm):
    class Meta:
        model = Forum
        exclude = ('slug','practice','parent','ordering','groups','when_created')

class CreateThreadForm(forms.Form):
    AREA_OF_PRACTIVE = (
        ("Government Contracts","Government Contracts"),
        ("Administrative Law","Administrative Law"),
        ("Admiralty Law","Admiralty Law"),
        ("Agriculture Law","Agriculture Law"),
        ("Antitrust and Trade Regulation","Antitrust and Trade Regulation"),
        ("Banking Law","Banking Law"),
        ("Bankruptcy Law","Bankruptcy Law"),
        ("Civil Rights","Civil Rights"),
        ("Commercial Law","Commercial Law"),
        ("Communications Law","Communications Law"),
        ("Constitutional Law","Constitutional Law"),
        ("Construction Law","Construction Law"),
        ("Contracts Law","Contracts Law"),
        ("Corporation and Enterprise Law","Corporation and Enterprise Law"),
        ("Criminal Law","Criminal Law"),
        ("Cyberspace Law","Cyberspace Law"),
        ("Dispute Resolution, Arbitration and Mediation","Dispute Resolution, Arbitration and Mediation"),
        ("Education Law","Education Law"),
        ("Energy Law","Energy Law"),
        ("Entertainment and Sports Law","Entertainment and Sports Law"),
        ("Environmental Law","Environmental Law"),
        ("Ethics and Professional Responsibility","Ethics and Professional Responsibility"),
        ("Administrative Law","Administrative Law"),
        ("Admiralty Law","Admiralty Law"),
        ("Agriculture Law","Agriculture Law"),
        ("Antitrust and Trade Regulation","Antitrust and Trade Regulation"),
        ("Banking Law","Banking Law"),
        ("Bankruptcy Law","Bankruptcy Law"),
        ("Civil Rights","Civil Rights"),
        ("Commercial Law","Commercial Law"),
        ("Communications Law","Communications Law"),
        ("Constitutional Law","Constitutional Law"),
        ("Construction Law", "Construction Law"),
        ("Contracts Law","Contracts Law"),
        ("Corporation and Enterprise Law","Corporation and Enterprise Law"),
        ("Criminal Law","Criminal Law"),
        ("Cyberspace Law","Cyberspace Law"),
        ("Dispute Resolution, Arbitration and Mediation","Dispute Resolution, Arbitration and Mediation"),
        ("Education Law","Education Law"),
        ("Energy Law","Energy Law"),
        ("Entertainment and Sports Law","Entertainment and Sports Law"),
        ("Environmental Law","Environmental Law"),
        ("Ethics and Professional Responsibility","Ethics and Professional Responsibility"),
        ("Family Law","Family Law"),
        ("Gaming Law","Gaming Law"),
        ("Government Benefits Law","Government Benefits Law"),
        ("Health Law","Health Law"),
        ("Immigration Law","Immigration Law"),
        ("Indian and Native Peoples Law","Indian and Native Peoples Law"),
        ("Injury & Tort Law","Injury & Tort Law"),
        ("Insurance Law","Insurance Law"),
        ("Intellectual Property","Intellectual Property"),
        ("International Law","International Law"),
        ("International Trade","International Trade"),
        ("Judges and the Judiciary","Judges and the Judiciary"),
        ("Labor Law","Labor Law"),
        ("Law & Economics","Law & Economics"),
        ("Legal Theory","Legal Theory"),
        ("Litigation","Litigation"),
        ("Military Law","Military Law"),
        ("Property Law","Property Law"),
        ("Securities Law","Securities Law"),
        ("Tax Law","Tax Law"),
        ("Transportation Law","Transportation Law"),
        ("Wills, Trusts, Estates and Probate","Wills, Trusts, Estates and Probate"),
    )
    title = forms.CharField(label=_("Title"), max_length=100)
    body = forms.CharField(label=_("Body"), widget=forms.Textarea(attrs={'rows':8, 'cols':50}))
    subscribe = forms.BooleanField(label=_("Subscribe via email"), required=False)
    practice = forms.ChoiceField(label=_("Area of Practice"), choices=AREA_OF_PRACTIVE)

class ReplyForm(forms.Form):
    body = forms.CharField(label=_("Body"), widget=forms.Textarea(attrs={'rows':8, 'cols':50}))
    subscribe = forms.BooleanField(label=_("Subscribe via email"), required=False)

